<#assign className = table.className>   
package ${basepackage}.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.xiaoshi.pojo.base.${className};
import com.xiaoshi.service.${className}Service;
import com.xiaoshi.util.Paginator;

@Controller
@RequestMapping("/admin")
public class ${className}Action extends BaseAction {

	@Autowired
	private ${className}Service ${table.lowerClassName}Service;

	/**
	 * 根据id获取${table.table_comment}信息
	 * @param ${table.idCol.proName}
	 * @param request
	 * @param response
	 * @param model
	 * @return
	 */
	@RequestMapping(value = "/${table.lowerClassName}/get", method = RequestMethod.GET)
	public String get(${table.idCol.javaType} ${table.idCol.proName},HttpServletRequest request,HttpServletResponse response, ModelMap model) {
		if (${table.idCol.proName} != null) {
			model.put("${table.lowerClassName}", ${table.lowerClassName}Service.getById(${table.idCol.proName}));
		}
		return "";
	}

    /**
	 * 获取${table.table_comment}列表
	 */
    @RequestMapping(value="/${table.lowerClassName}/query",method=RequestMethod.POST)
	public String query(${className} param) {
    	Paginator pagin = getPaginator();
    	pagin.addParameter("orderBy", "id");
    	pagin = ${table.lowerClassName}Service.findByPage(pagin);
    	return pagin(pagin);
	}

}